﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using NDepot.Models;
using NDepot.Repository.Base;

namespace NDepot.Repository
{
    public class OrderRepository : IOrderRepository
    {
        private DepotDataContext _dataContext;

        public OrderRepository()
        {
            _dataContext = new DepotDataContext();
        }

        public int Count { get { return _dataContext.Orders.Select(x => x.Id).Count(); } }

        public Order GetById(Guid id)
        {
            throw new NotImplementedException();
        }

        public void Insert(Order entity)
        {
            _dataContext.Orders.InsertOnSubmit(entity);
            _dataContext.SubmitChanges();
        }

        public void Update(Order entity)
        {
            throw new NotImplementedException();
        }

        public IList<Order> GetAll()
        {
            throw new NotImplementedException();
        }

        public bool Delete(Order entity)
        {
            throw new NotImplementedException();
        }

        public void DeleteAll()
        {
            throw new NotImplementedException();
        }
    }
}